home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / demomod3.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  446 b   |  34 lines

  1. module DemoMod3;
  2.  
  3. type
  4.   FooType = Integer;
  5.  
  6. var
  7.   Foo : FooType;
  8.  
  9. procedure SetFoo (f : FooType);
  10. begin
  11.   Foo := f
  12. end;
  13.  
  14. function GetFoo : FooType;
  15. begin
  16.   GetFoo := Foo;
  17. end;
  18.  
  19. end.
  20.  
  21. program ModDemo3 (Output);
  22.  
  23. { Manually do the "import" from DemoMod3 }
  24. type
  25.   FooType = Integer;
  26.  
  27. procedure SetFoo (f : FooType); external;
  28. function  GetFoo : FooType;     external;
  29.  
  30. begin
  31.   SetFoo (999);
  32.   WriteLn (GetFoo)
  33. end.
  34.